{% extends 'home/index.html' %}

{% block title %}
<title>商品列表页</title>
{% endblock %}

{% block css %}
<link href="/static/home/css/seastyle.css" rel="stylesheet" type="text/css" />
{% endblock %}

{% block con %}
<div class="search">
            <div class="search-list">
            <div class="nav-table">
                       <div class="long-title"><span class="all-goods">全部分类</span></div>
                       <div class="nav-cont">
                            <ul>
                                <li class="index"><a href="{% url 'home_index'%}">首页</a></li>
                                <li class="qc"><a href="#">闪购</a></li>
                                <li class="qc"><a href="#">限时抢</a></li>
                                <li class="qc"><a href="#">团购</a></li>
                                <li class="qc last"><a href="#">大包装</a></li>
                            </ul>
                            <div class="nav-extra">
                                <i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
                                <i class="am-icon-angle-right" style="padding-left: 10px;"></i>
                            </div>
                        </div>
            </div>
            
                
                    <div class="am-g am-g-fixed">
                        <div class="am-u-sm-12 am-u-md-12">
                        <div class="theme-popover">                                                     
                            <div class="searchAbout">
                                <span class="font-pale">相关搜索：</span>
                                <a title="{{ ob.name }}" href="#">{{ ob.name }}</a>
                               
                            </div>
                            <div class="clear"></div>
                        </div>


                            <div class="search-content">
                                <div class="sort">
                                    <li {% if request.GET.orderby %} a {% else%} class="first" {% endif %}><a title="综合" href="{% url 'home_goodslist' %}?cid={{ ob.id }}">综合排序</a></li>
                                    <li  {% if request.GET.orderby == "-ordernum" %} class="first" {% endif %}><a title="销量"  href="{% url 'home_goodslist' %}?cid={{ ob.id}}&orderby=-ordernum ">销量排序</a></li>
                                    <li {% if request.GET.orderby == "price" %} class="first" {% endif %}><a title="价格"  href="{% url 'home_goodslist'  %}?cid={{ ob.id}}&orderby=price ">价格优先</a></li>
                                </div>
                                <div class="clear"></div>

                                <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
                                    {% for i in data2 %}
                                    <li>
                                        <a href="{% url 'home_goodsinfo' %}?gid={{i.id}} ">
                                            <div class="i-pic limit">
                                                <img src="{{ i.pic_url }}" height="218" width="218">                                            
                                                <p class="title fl">{{ i.title }}</p>
                                                <p class="price fl">
                                                    <b>¥</b>
                                                    <strong>{{ i.price }}</strong>
                                                </p>
                                                <p class="number fl">
                                                    销量<span>{{ i.ordernum }}</span>
                                                </p>
                                            </div>
                                        </a>
                                    </li>
                                    {% endfor %}
                                  
                                </ul>
                            </div>
                            <div class="search-side">

                                <div class="side-title">
                                    经典搭配
                                </div>

                                <li>
                                    <div class="i-pic check">
                                        <img src="/static/home/images/cp.jpg">
                                        <p class="check-title">萨拉米 1+1小鸡腿</p>
                                        <p class="price fl">
                                            <b>¥</b>
                                            <strong>29.90</strong>
                                        </p>
                                        <p class="number fl">
                                            销量<span>1110</span>
                                        </p>
                                    </div>
                                </li>
                                <li>
                                    <div class="i-pic check">
                                        <img src="/static/home/images/cp2.jpg">
                                        <p class="check-title">ZEK 原味海苔</p>
                                        <p class="price fl">
                                            <b>¥</b>
                                            <strong>8.90</strong>
                                        </p>
                                        <p class="number fl">
                                            销量<span>1110</span>
                                        </p>
                                    </div>
                                </li>
                                <li>
                                    <div class="i-pic check">
                                        <img src="/static/home/images/cp.jpg">
                                        <p class="check-title">萨拉米 1+1小鸡腿</p>
                                        <p class="price fl">
                                            <b>¥</b>
                                            <strong>29.90</strong>
                                        </p>
                                        <p class="number fl">
                                            销量<span>1110</span>
                                        </p>
                                    </div>
                                </li>

                            </div>
                            <div class="clear"></div>
                            <!--分页 -->
                            <ul class="am-pagination am-pagination-right">
                                <!-- <li class="am-disabled"><a href="#">«</a></li>
                                <li class="am-active"><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">»</a></li> -->
                                 {% load pagetag %}

                                {% Showpages data2.paginator.num_pages request %}
                            
                            </ul>

                        </div>
                    </div>
                  
                </div>

            </div>

{% endblock %}